home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
pxewin.zip
/
PXI.CPP
< prev
next >
Wrap
Text File
|
1992-02-06
|
2KB
|
85 lines
// PXEWIN - (C) Copyright 1992 by Beam Engineering, INC.
// PXI.CPP //
// Contents ----------------------------------------------------------------
//
// This modules contains the members for the PXI class for intializing
// the engine.
//
// End ---------------------------------------------------------------------
// External Reference Name for this Header ---------------------------------
#ifndef PXI_CPP
#define PXI_CPP
// End ---------------------------------------------------------------------
// Interface Dependencies --------------------------------------------------
#ifndef PXI_HPP
#include "pxi.hpp"
#endif // PXI_HPP //
// End ---------------------------------------------------------------------
// Constructor PXI //
PXI::PXI(char *client,int ShareMode)
{
clt = client;
smode = ShareMode;
// Open a new engine data buffer.
EngDataPtr = new EngData;
if((EngDataPtr->Errors.pxerr = PXWinInit(client,ShareMode))
!= PXSUCCESS)
{
PXError(ENG_ERROR);
return;
}
close_status = OPENED;
}
// Summary -----------------------------------------------------------------
//
// Initializes engine for Windows.
//
// Parameters
//
// client. Specifies Windows client mode.
//
// ShareMode. Specifies Windows shar options.
//
// Functional Description
//
// Initialize client mode and share mode for windows operation. Set the
// close status to indicate that the engine has been initialize already.
//
// End ---------------------------------------------------------------------
// Destructor ~PXI //
inline PXI::~PXI(void)
{
// If successful initialization, exit.
if(close_status == OPENED)
{
if((EngDataPtr->Errors.pxerr = PXExit()) != PXSUCCESS)
PXError(ENG_ERROR);
}
delete EngDataPtr;
EngDataPtr = NULL;
}
// Description -------------------------------------------------------------
//
// If the engine is opened, close it.
//
// End ---------------------------------------------------------------------
#endif // PXI_CPP //